package com.colt.usercenter.util.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 响应数据结构封装
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseData<T> /*extends BaseResponse*/ {
    /**
     * 响应码
     */

    private int code;
    /**
     * 响应消息
     */
    private String msg;

    private T data;

   /* private ResponseData(CodeEnum code, T data) {
        super(code);
        this.data = data;
    }*/
//    public static <T> ResponseData<T> out(CodeEnum code, T data) {
//        return new ResponseData<T>(code, data);
//    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

}
